<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<jsp:directive.page language="java"
	contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" />
<html xmlns="http://www.w3.org/1999/xhtml">
	<head>
		<title>信息发布列表</title>
		<%@ include file="/commons/includes/head.jspf"%>
		<%@ include file="/commons/extremecomponents/extremetable.jspf"%>
		<%@ include file="/commons/manage/content.jspf"%>
		<script type="text/javascript" src="<c:url value="/commons/scripts/calendar.js" />"></script>
		<script type="text/javascript" src="informationList.js"></script>
	</head>
	<body>
		<form name="informationList" action="informationList.shtml"
			method="post">
			<input type="hidden" id="event" name="event" />
			<input type="hidden" name="ec_f_catalog" value="${cons['catalog']}"/>
			<input type="hidden" name="ec_f_state" value="${cons['state']}"/>
			<input type="hidden" id="state" name="state" />
			<input type="hidden" name="queryNow" value="${param.queryNow}" />
			<div class="contBtnDiv">
				<span class="contBtn contBtnNew" id="btnNew">新 增</span>
				<c:if test="${cons['state'] eq 'PUBLISHED'}">
					<span class="contBtn contBtnDel" id="btnDel">删 除</span>
					<span class="contBtn contBtnDraft" id="btnDraft">草 稿</span>
					<span class="contBtn contBtnDeled" id="btnDeled">已删除</span>
				</c:if>
				<c:if test="${cons['state'] eq 'DRAFT'}">
					<span class="contBtn contBtnDel" id="btnDel">删 除</span>
					<span class="contBtn contBtnPublish" id="btnPublish">发 布</span>
					<span class="contBtn contBtnPubed" id="btnPubed">已发布</span>
					<span class="contBtn contBtnDeled" id="btnDeled">已删除</span>
				</c:if>
				<c:if test="${cons['state'] eq 'DEL'}">
					<span class="contBtn contBtnDel" id="btnComplete">彻底删除</span>
					<span class="contBtn contBtnRestore" id="btnPublish">恢 复</span>
					<span class="contBtn contBtnPubed" id="btnPubed">已发布</span>
					<span class="contBtn contBtnDraft" id="btnDraft">草 稿</span>
				</c:if>
				<span class="contBtn contBtnSearch" id="btnQuery">查 询</span>
			</div>
			<div class="showSearchDiv">
				<div class="downBtn"></div>
			</div>
			<div class="searchDiv">
				<table style="width: 100%;">
					<tr>
						<td align="center" width="15%">
							置顶：
						</td>
						<td style="width: 35%;">
							<select name="ec_f_sticky" style="width:50px;">
								<option></option>
								<option value="1"
									<c:if test="${param.sticky == 1}">selected="selected"</c:if>>
									是
								</option>
								<option value="0"
									<c:if test="${param.sticky == 0}">selected="selected"</c:if>>
									否
								</option>
							</select>
						</td>
						<td align="center" width="15%">
							信息标题：
						</td>
						<td style="width: 35%;">
							<input type="text" class="text" name="ec_f_title" value="${param.ec_f_title}"
								style="width: 250px;" />
						</td>
					</tr>
					<c:if test="${cons['state'] eq 'PUBLISHED'}">
					<tr>
						<td align="center">
							发布时间：
						</td>
						<td>
							<input type="text" class="text" name="ec_f_publishDateBegin"
								value="${param.ec_f_publishDateBegin}" onfocus="calendar();"
								style="width: 115px;" readonly="readonly" />
							至
							<input type="text" class="text" name="ec_f_publishDateEnd"
								value="${param.ec_f_publishDateEnd}" onfocus="calendar();"
								style="width: 115px;" readonly="readonly" />
						</td>
						<td align="center">
							发布人：
						</td>
						<td>
							<input type="text" class="text" name="ec_f_publisher" value="${param.ec_f_publisher}"
								style="width: 250px;" />
						</td>
					</tr>
					</c:if>
					<c:if test="${cons['state'] eq 'DRAFT'}">
					<tr>
						<td align="center">
							创建时间：
						</td>
						<td>
							<input type="text" class="text" name="ec_f_createBegin"
								value="${param.ec_f_createBegin}" onfocus="calendar();"
								style="width: 115px;" readonly="readonly" />
							至
							<input type="text" class="text" name="ec_f_createEnd"
								value="${param.ec_f_createEnd}" onfocus="calendar();"
								style="width: 115px;" readonly="readonly" />
						</td>
						<td align="center">
							创建人：
						</td>
						<td>
							<input type="text" class="text" name="ec_f_creator" value="${param.ec_f_creator}"
								style="width: 250px;" />
						</td>
					</tr>
					</c:if>
					<c:if test="${cons['state'] eq 'DEL'}">
					<tr>
						<td align="center">
							删除时间：
						</td>
						<td>
							<input type="text" class="text" name="ec_f_lastEditDateBegin"
								value="${param.ec_f_submitTimeBegin}" onfocus="calendar();"
								style="width: 115px;" readonly="readonly" />
							至
							<input type="text" class="text" name="ec_f_lastEditDateBegin"
								value="${param.ec_f_submitTimeEnd}" onfocus="calendar();"
								style="width: 115px;" readonly="readonly" />
						</td>
						<td align="center">
							删除人：
						</td>
						<td>
							<input type="text" class="text" name="ec_f_lastEditor" value="${param.ec_f_lastEditor}"
								style="width: 250px;" />
						</td>
					</tr>
					</c:if>
					<tr>
						<td align="center">
							信息内容：
						</td>
						<td colspan="3">
							<input type="text" class="text" name="ec_f_content" value="${param.ec_f_content}"
								style="width: 657px;" />
						</td>
					</tr>
				</table>
			</div>
			<ec:table items="informationList" var="information" view="manage" theme="eXtManage"
				form="informationList" action="informationList.shtml">
				<ec:row>
					<c:url var="editUrl"
						value="informationEdit.shtml?id=${information.id}" />
					<ec:column property="id" width="10%" sortable="false" headerStyle="text-align: center;" style="text-align: center;"
						title="<input type='checkbox' title='全选' onclick='javascript: selectAll(\"selectedIds\");' />">
						<input type="checkbox" name="selectedIds"
							value="${information.id}" />
					</ec:column>
					<ec:column property="title" title="标题" alias="TITLE_">
						<a href="${editUrl}"><c:out value="${information.title}" /> </a>
					</ec:column>
					<c:if test="${(empty cons['state']) or (cons['state'] eq 'DRAFT') or (cons['state'] eq 'DEL')}">
						<ec:column property="creator" title="创建人" alias="CREATOR_"
							style="width: 80px;">
							<a href="${editUrl}"><c:out value="${userMap[information.creator].name}" />
							</a>
						</ec:column>
						<ec:column property="create" title="创建时间" alias="CREATE_"
							style="width: 100px;">
							<a href="${editUrl}"><fmt:formatDate
									value="${information.create}" pattern="yyyy-MM-dd HH:mm" />
							</a>
						</ec:column>
					</c:if>
					<c:if test="${cons['state'] eq 'PUBLISHED'}">
						<ec:column property="publisher" title="发布人" alias="PUBLISHER_"
							style="width: 80px;">
							<a href="${editUrl}"><c:out value="${userMap[information.publisher].name}" />
							</a>
						</ec:column>
						<ec:column property="publishDate" title="发布时间" alias="PUB_DATE_"
							style="width: 110px;">
							<a href="${editUrl}"><fmt:formatDate
									value="${information.publishDate}" pattern="yyyy-MM-dd HH:mm" />
							</a>
						</ec:column>
					</c:if>
					<ec:column property="lastEditor" title="${cons['state'] eq 'DEL'? '删除人':'修改人'}" alias="LAST_EDITOR_"
						style="width: 80px;">
						<a href="${editUrl}"><c:out value="${userMap[information.lastEditor].name}" />
						</a>
					</ec:column>
					<ec:column property="lastEditDate" title="${cons['state'] eq 'DEL'? '删除时间':'修改时间'}" alias="LAST_EDITDATE_"
						style="width: 110px;">
						<a href="${editUrl}"><fmt:formatDate
								value="${information.lastEditDate}" pattern="yyyy-MM-dd HH:mm" />
						</a>
					</ec:column>
					<ec:column property="state" title="状态" alias="STATE_"
						style="width: 30px;">
						<a href="${editUrl}"><c:out
								value="${stateMap[information.state]}" /> </a>
					</ec:column>
					<ec:column property="sticky" title="置顶" alias="STICKY_"
						style="width: 30px;">
						<a href="${editUrl}"><c:out
								value="${information.sticky?'是':'否'}" /> </a>
					</ec:column>
				</ec:row>
			</ec:table>
		</form>
	</body>
</html>